

export default {
  state: {
    sign_in: 0, //0未登录 1登录
    sign_up: '/user/sign_up', //注册地址
    sign_out: '/user/sign_out', //注销地址
    name: '',
    avatar: ''
  },
  mutations: {
    refreshUserInfo(state, json) {
      state.sign_in = json.sign_in
      if(json.user) {
        state.name = json.user.name
        state.avatar = json.user.avatar
      }else {
        state.name =  ''
        state.avatar = ''
      }
      // state.signInUrl = json.uri.sign_in
      // state.signOutUrl = json.uri.sign_out 
    }
  },
}
